import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      name: 'Home',   
        component: () => import('@/views/Home.vue')
    },
    {
      path: '/about',
      name: 'About',
      component: () => import('@/views/About.vue')
    },
    {
      path: '/news',
      name: 'news',
      component: () => import('@/views/News.vue'),
      children: [
        {
          path: '',
          name: 'newDetail',
          component: () => import('@/views/NewDetail.vue')
        }
      ]
    }
  ]
})

export default router
